/**
 * Iterator implementation for XMPNode arrays.
 * This class wraps an array iterator to provide a custom iterator interface.
 */

import XMPNode from './XMPNode';

/**
 * Iterator implementation for XMPNode
 */
export default class XMPNodeIterator implements Iterator<XMPNode> {
  private iterator: Iterator<XMPNode>;

  constructor(iterator: Iterator<XMPNode>) {
    this.iterator = iterator;
  }

  next(): IteratorResult<XMPNode> {
    return this.iterator.next();
  }

  [Symbol.iterator](): Iterator<XMPNode> {
    return this;
  }
}

